﻿#ifndef TOUCHHANDLER_H
#define TOUCHHANDLER_H

#include <QObject>
#include <QList>
#include <QTouchEvent>

#include "utils/touch/TouchPoint.h"
#include "services/tlv/Com/TlvThreadCom.h"


enum TlvTouchDef : uint8_t {
    FINGER_NULL       = 0x00,
    FINGER_PERSS      = 0x01,
    FINGER_MOVE       = 0x02,
    FINGER_RELEASE    = 0x03,
};


class TouchHandler : public QObject
{
    Q_OBJECT
public:
    explicit TouchHandler(QObject *parent = nullptr);

protected:
    void handleTlvData(const Tlv& tlv);

signals:
    void touched(const QList<TouchPoint>& points);
};

#endif // TOUCHHANDLER_H
